home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Aztec C 5.0a disk 1.adf / include / libraries / dos.h < prev    next >
C/C++ Source or Header  |  1988-10-05  |  4KB  |  127 lines

  1. #ifndef    LIBRARIES_DOS_H
  2. #define    LIBRARIES_DOS_H
  3. #ifndef    EXEC_TYPES_H
  4. #include    "exec/types.h"
  5. #endif
  6. #define    DOSNAME    "dos.library"
  7. #define    DOSTRUE    (-1L)
  8. #define    DOSFALSE    (0L)
  9. #define    MODE_OLDFILE    1005
  10. #define    MODE_NEWFILE    1006
  11. #define    MODE_READWRITE    1004
  12. #define    OFFSET_BEGINNING    -1
  13. #define    OFFSET_CURRENT    0
  14. #define    OFFSET_END    1
  15. #define    OFFSET_BEGINING    OFFSET_BEGINNING
  16. #define    BITSPERBYTE    8
  17. #define    BYTESPERLONG    4
  18. #define    BITSPERLONG    32
  19. #define    MAXINT    0x7FFFFFFF
  20. #define    MININT    0x80000000
  21. #define    SHARED_LOCK    -2
  22. #define    ACCESS_READ    -2
  23. #define    EXCLUSIVE_LOCK    -1
  24. #define    ACCESS_WRITE    -1
  25. struct    DateStamp    {
  26. LONG    ds_Days;
  27. LONG    ds_Minute;
  28. LONG    ds_Tick;
  29. };
  30. #define    TICKS_PER_SECOND    50
  31. struct    FileInfoBlock    {
  32. LONG    fib_DiskKey;
  33. LONG    fib_DirEntryType;
  34. char    fib_FileName[108];
  35. LONG    fib_Protection;
  36. LONG    fib_EntryType;
  37. LONG    fib_Size;
  38. LONG    fib_NumBlocks;
  39. struct    DateStamp    fib_Date;
  40. char    fib_Comment[80];
  41. char    fib_Reserved[36];
  42. };
  43. #define    FIBB_SCRIPT    6
  44. #define    FIBB_PURE    5
  45. #define    FIBB_ARCHIVE    4
  46. #define    FIBB_READ    3
  47. #define    FIBB_WRITE    2
  48. #define    FIBB_EXECUTE    1
  49. #define    FIBB_DELETE    0
  50. #define    FIBF_SCRIPT    (1<<FIBB_SCRIPT)
  51. #define    FIBF_PURE    (1<<FIBB_PURE)
  52. #define    FIBF_ARCHIVE    (1<<FIBB_ARCHIVE)
  53. #define    FIBF_READ    (1<<FIBB_READ)
  54. #define    FIBF_WRITE    (1<<FIBB_WRITE)
  55. #define    FIBF_EXECUTE    (1<<FIBB_EXECUTE)
  56. #define    FIBF_DELETE    (1<<FIBB_DELETE)
  57. typedef    long    BPTR;
  58. typedef    long    BSTR;
  59. #ifdef    OBSOLETE_LIBRARIES_DOS_H
  60. #define    BADDR(    bptr    )    (((ULONG)bptr)    <<    2)
  61. #else
  62. #define    BADDR(x)    ((APTR)((ULONG)x    <<    2))
  63. #endif
  64. struct    InfoData    {
  65. LONG    id_NumSoftErrors;
  66. LONG    id_UnitNumber;
  67. LONG    id_DiskState;
  68. LONG    id_NumBlocks;
  69. LONG    id_NumBlocksUsed;
  70. LONG    id_BytesPerBlock;
  71. LONG    id_DiskType;
  72. BPTR    id_VolumeNode;
  73. LONG    id_InUse;
  74. };
  75. #define    ID_WRITE_PROTECTED    80
  76. #define    ID_VALIDATING    81
  77. #define    ID_VALIDATED    82
  78. #define    ID_NO_DISK_PRESENT    (-1)
  79. #define    ID_UNREADABLE_DISK    (('B'<<24)    |    ('A'<<16)    |    ('D'<<8))
  80. #define    ID_DOS_DISK    (('D'<<24)    |    ('O'<<16)    |    ('S'<<8))
  81. #define    ID_NOT_REALLY_DOS    (('N'<<24)    |    ('D'<<16)    |    ('O'<<8)    |    ('S'))
  82. #define    ID_KICKSTART_DISK    (('K'<<24)    |    ('I'<<16)    |    ('C'<<8)    |    ('K'))
  83. #define    ERROR_NO_FREE_STORE    103
  84. #define    ERROR_TASK_TABLE_FULL    105
  85. #define    ERROR_LINE_TOO_LONG    120
  86. #define    ERROR_FILE_NOT_OBJECT    121
  87. #define    ERROR_INVALID_RESIDENT_LIBRARY    122
  88. #define    ERROR_NO_DEFAULT_DIR    201
  89. #define    ERROR_OBJECT_IN_USE    202
  90. #define    ERROR_OBJECT_EXISTS    203
  91. #define    ERROR_DIR_NOT_FOUND    204
  92. #define    ERROR_OBJECT_NOT_FOUND    205
  93. #define    ERROR_BAD_STREAM_NAME    206
  94. #define    ERROR_OBJECT_TOO_LARGE    207
  95. #define    ERROR_ACTION_NOT_KNOWN    209
  96. #define    ERROR_INVALID_COMPONENT_NAME    210
  97. #define    ERROR_INVALID_LOCK    211
  98. #define    ERROR_OBJECT_WRONG_TYPE    212
  99. #define    ERROR_DISK_NOT_VALIDATED    213
  100. #define    ERROR_DISK_WRITE_PROTECTED    214
  101. #define    ERROR_RENAME_ACROSS_DEVICES    215
  102. #define    ERROR_DIRECTORY_NOT_EMPTY    216
  103. #define    ERROR_TOO_MANY_LEVELS    217
  104. #define    ERROR_DEVICE_NOT_MOUNTED    218
  105. #define    ERROR_SEEK_ERROR    219
  106. #define    ERROR_COMMENT_TOO_BIG    220
  107. #define    ERROR_DISK_FULL    221
  108. #define    ERROR_DELETE_PROTECTED    222
  109. #define    ERROR_WRITE_PROTECTED    223
  110. #define    ERROR_READ_PROTECTED    224
  111. #define    ERROR_NOT_A_DOS_DISK    225
  112. #define    ERROR_NO_DISK    226
  113. #define    ERROR_NO_MORE_ENTRIES    232
  114. #define    RETURN_OK    0
  115. #define    RETURN_WARN    5
  116. #define    RETURN_ERROR    10
  117. #define    RETURN_FAIL    20
  118. #define    SIGBREAKB_CTRL_C    12
  119. #define    SIGBREAKB_CTRL_D    13
  120. #define    SIGBREAKB_CTRL_E    14
  121. #define    SIGBREAKB_CTRL_F    15
  122. #define    SIGBREAKF_CTRL_C    (1<<SIGBREAKB_CTRL_C)
  123. #define    SIGBREAKF_CTRL_D    (1<<SIGBREAKB_CTRL_D)
  124. #define    SIGBREAKF_CTRL_E    (1<<SIGBREAKB_CTRL_E)
  125. #define    SIGBREAKF_CTRL_F    (1<<SIGBREAKB_CTRL_F)
  126. #endif
  127.